package com.zer0.tga.ui;

import com.zer0.tga.Game;
import com.zer0.tga.art.Bitmap;
import com.zer0.tga.art.Screen;

public class Ui {

	public Bitmap bitmap;
	
	//public Game game;
	
	public Ui()
	{
		bitmap = new Bitmap(Game.getInstance().uiscreen.width,Game.getInstance().uiscreen.height);
		bitmap.clearWithColor(0xff000000);
	}
	
	public Ui(int w, int h)
	{
		bitmap = new Bitmap(w,h);
		bitmap.clearWithColor(0xff000000);
	//	this.game = game;
	}
	
	
	public void render(Screen screen)
	{
		
	}
	
	public void renderBackground(Screen screen)
	{
		screen.clearWithColor(0);
		screen.draw(Game.getInstance().hudscreen.fade(1, 3), 0, 0);
		screen.draw(Game.getInstance().screen.fade(1, 3), 0, Game.getInstance().hudscreen.height);
	}
	
	
	public void tick()
	{
		//keys.tick();
	}
	
/*
	public void getControl()
	{
	//	addKeyListener(this);
	}
	
	public void givebackControl()
	{
		
	}*/
	
	/*
	 * 		if(a<=100)
			screen.draw(ui.bitmap.fadeIn(a, 100), screen.width/2, screen.height/2);
		else if(a>100 && a<200)
			screen.draw(ui.bitmap.fadeOut(a-100, 100), screen.width/2, screen.height/2);
		else
		{
			screen.draw(ui.bitmap.fadeOut(a-100, 100), screen.width/2, screen.height/2);
			a=-1;
		}
		a++;
	 */
	
}
